package com.yunxi.service.localService.impl.finance;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yunxi.core.service.ServiceImplPlus;
import com.yunxi.dao.finance.DynamicRebateCommissionMapper;
import com.yunxi.finance.pojo.*;
import com.yunxi.model.finance.DynamicRebateCommission;
import com.yunxi.service.localService.finance.DynamicRebateCommissionService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 返利与佣金 服务实现类
 * </p>
 *
 * @author 
 * @since 2019-09-16
 */
@Service
public class DynamicRebateCommissionServiceImpl extends ServiceImplPlus<DynamicRebateCommissionMapper, DynamicRebateCommission> implements DynamicRebateCommissionService {

    /**
     * 返利与佣金主数据查询
     * @param vo
     * @param pageNum
     * @param pageSize
     * @return
     */
    @Override
    public PageInfo<DynamicRebateCommissionQueryRespVO> queryDynamicRebateCommissionByList(DynamicRebateCommissionQueryReqVO vo, Integer pageNum, Integer pageSize){
        PageHelper.startPage(pageNum,pageSize);
        List<DynamicRebateCommissionQueryRespVO> result = this.baseMapper.queryDynamicRebateCommissionByList(vo);
        PageInfo<DynamicRebateCommissionQueryRespVO> pageInfo = new PageInfo<>(result);
        return pageInfo;
    }

    @Override
    public List<DynamicRebateCommissionQuerySumRespVO> queryExportDataMainData(DynamicRebateCommissionQueryReqVO vo){
        return this.baseMapper.queryDynamicRebateCommissionBySum(vo);
    }

    @Override
    public List<OrderRebateQueryRespVO> queryOrderRebateByList(DynamicRebateCommissionQueryReqVO vo) {
        return this.baseMapper.queryOrderRebateByList(vo);
    }

    @Override
    public List<HandleRebateQueryRespVO> queryHandleRebateByList(DynamicRebateCommissionQueryReqVO vo) {
        return this.baseMapper.queryHandleRebateByList(vo);
    }

    @Override
    public List<CustomerRebateQueryRespVO> queryCustomerRebateByList(DynamicRebateCommissionQueryReqVO vo) {
        return this.baseMapper.queryCustomerRebateByList(vo);
    }


    @Override
    public DynamicRebateCommissionQueryRespVO queryDynamicRabateCommissionBySingle(DynamicRebateCommissionQueryReqVO vo) {
        return baseMapper.queryDynamicRebateCommissionBySingle(vo);
    }

}
